// 预警监控组件独立配置
export const WarningMonitorConfig = {
    // 图表容器配置
    container: {
        height: {
            desktop: 450,
            tablet: 400,
            mobile: 350
        },
        padding: '20px'
    },

    // 爽约率监控配置
    noShowChart: {
        title: {
            text: '爽约率趋势监控',
            fontSize: 16,
            fontWeight: 'bold',
            color: '#303133'
        },
        grid: {
            left: '8%',
            right: '8%',
            bottom: '15%',
            top: '15%',
            containLabel: true
        },
        line: {
            symbolSize: 6,
            lineWidth: 2,
            smooth: true
        },
        markLine: {
            warning: {
                yAxis: 10,
                color: '#e6a23c',
                label: '预警线(10%)'
            },
            danger: {
                yAxis: 15,
                color: '#f56c6c',
                label: '警戒线(15%)'
            }
        },
        areaStyle: {
            color: {
                type: 'linear',
                x: 0, y: 0, x2: 0, y2: 1,
                colorStops: [
                    { offset: 0, color: 'rgba(255, 107, 107, 0.3)' },
                    { offset: 1, color: 'rgba(255, 107, 107, 0.1)' }
                ]
            }
        },
        days: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        data: [8, 12, 15, 18, 14, 10, 9]
    },

    // 资源闲置预警配置
    resourceChart: {
        title: {
            text: '资源使用率监控',
            fontSize: 16,
            fontWeight: 'bold',
            color: '#303133'
        },
        pie: {
            radius: ['35%', '65%'],
            center: ['50%', '50%'],
            emphasis: {
                label: {
                    fontSize: 18,
                    fontWeight: 'bold'
                }
            }
        },
        legend: {
            orient: 'vertical',
            left: '8%',
            top: 'middle'
        },
        colors: ['#67c23a', '#e6a23c', '#f56c6c'],
        data: [
            { name: '正常使用', value: 65 },
            { name: '轻度闲置', value: 20 },
            { name: '严重闲置', value: 15 }
        ]
    },

    // 预警统计配置
    alertStats: {
        title: {
            text: '预警类型统计',
            fontSize: 16,
            fontWeight: 'bold',
            color: '#303133'
        },
        grid: {
            left: '8%',
            right: '8%',
            bottom: '15%',
            top: '15%',
            containLabel: true
        },
        bar: {
            width: '60%',
            label: {
                fontSize: 12,
                position: 'top'
            }
        },
        colors: ['#f56c6c', '#e6a23c', '#409eff', '#67c23a', '#909399'],
        categories: ['爽约预警', '资源闲置', '设备维护', '技师短缺', '其他'],
        data: [12, 8, 5, 3, 2]
    },

    // 实时预警列表配置
    alertList: {
        title: {
            text: '实时预警列表',
            fontSize: 16,
            fontWeight: 'bold',
            color: '#303133'
        },
        maxHeight: 400,
        refreshInterval: 30000, // 30秒刷新一次
        alerts: [
            {
                id: 1,
                type: '爽约率超标',
                level: 'danger',
                message: '今日爽约率达到18%,超过15%阈值',
                time: '2024-01-15 10:30:00',
                status: 'pending'
            },
            {
                id: 2,
                type: '资源闲置',
                level: 'warning',
                message: '3号包间使用率低于30%',
                time: '2024-01-15 10:25:00',
                status: 'handled'
            },
            {
                id: 3,
                type: '设备维护',
                level: 'info',
                message: '按摩椅2号需要定期保养',
                time: '2024-01-15 10:20:00',
                status: 'pending'
            }
        ]
    }
} 